<template>
    <div>
        <h1>我是test</h1>
        <button @click="test">test</button>
    </div>
</template>

<script>
    export default {
        name:'test',
        methods:{
            test(){
                console.log('你点我了');
                document.cookie="userName=hulk";
            }
        }
    }
</script>

<style>

</style>